//
//  HEDocOrderAddAddressCell.m
//  HealthElderly
//
//  Created by 吴欧 on 2021/5/13.
//  Copyright © 2021 honglutec. All rights reserved.
//

#import "HEDocOrderAddAddressCell.h"


@interface HEDocOrderAddAddressCell ()


@end

@implementation HEDocOrderAddAddressCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        
        [self initUI];
    }
    return self;
}

- (void)initUI {
    QMUIGhostButton *addBtn = [[QMUIGhostButton alloc] initWithGhostColor:CNavBgColor];
    addBtn.titleLabel.font = UIFontMake(16);
    [addBtn setTitle:@"添加上门服务地址 +" forState:UIControlStateNormal];
    [addBtn setTitleColor:CNavBgColor forState:UIControlStateNormal];
    [self.contentView addSubview:addBtn];
    [addBtn addTarget:self action:@selector(addBtnClick) forControlEvents:UIControlEventTouchUpInside];
    
    [addBtn mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(self.contentView).offset(15);
        make.right.equalTo(self.contentView).offset(-40);
        make.left.equalTo(self.contentView).offset(40);
        make.height.mas_offset(44);
        make.bottom.equalTo(self.contentView).offset(-15);
    }];
}

- (void)configCellWithModel:(id)model fiterModel:(GDFiterCellModel *)fiterModel indexPath:(NSIndexPath *)indexPath {
    self.delegate = self.formModel.proxyVC;
}

- (void)addBtnClick {
    if ([self.delegate respondsToSelector:@selector(orderAddAddressSelect)]) {
        [_delegate orderAddAddressSelect];
    }
}
 
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
}

@end

